//
//  HomeDiTuiTableViewCell.m
//  Doctors
//
//  Created by 王森 on 16/4/8.
//  Copyright © 2016年 王森. All rights reserved.
//

#import "HomeDiTuiTableViewCell.h"
#import "lhScanQCodeViewController.h"
@implementation HomeDiTuiTableViewCell
{
    
    NSString *mobile;
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)cellData:(NSDictionary *)dicRecource
{
    /*地推码*/
    self.pushCode.text = [NSString stringWithFormat:@"%@", dicRecource[@"pushInfo"][@"pushCode"]];
    self.name.text= dicRecource[@"pushInfo"][@"username"];
    self.number.text=dicRecource[@"pushInfo"][@"mobile"];
    mobile=dicRecource[@"pushInfo"][@"mobile"];
    
    /*服务时间*/
    NSString *time_string = dicRecource[@"pushInfo"][@"time"];
    NSTimeInterval _interval=[time_string doubleValue] / 1000.0;
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:_interval];
    NSDateFormatter *objDateformat = [[NSDateFormatter alloc] init];
    [objDateformat setDateFormat:@"yyyy-MM-dd hh:mm:ss"];
    NSString *day_date =[objDateformat stringFromDate: date];
    NSLog(@"地推时间%@", day_date);
    self.serverTime.text = [NSString stringWithFormat:@"%@",day_date];
    
    /*服务地址*/
    self.address.text = [NSString stringWithFormat:@"%@", dicRecource[@"pushInfo"][@"address"]];
  
    
}


- (IBAction)BoDaMobile:(id)sender {
    
    if (_boDaMobile) {
        _boDaMobile(mobile);
        
    }

}
@end
